}
None => name
};
- writeln!(config.shell().err(), "{}", line)?;
+ println!("{}", line);
}
let search_max_limit = 100;
if total_crates > limit as u32 && limit < search_max_limit {
- writeln!(config.shell().err(),
- "... and {} crates more (use --limit N to see more)",
- total_crates - limit as u32)?;
+ println!("... and {} crates more (use --limit N to see more)",
+ total_crates - limit as u32);
} else if total_crates > limit as u32 && limit >= search_max_limit {
- writeln!(config.shell().err(),
- "... and {} crates more (go to http://crates.io/search?q={} to see more)",
+ println!("... and {} crates more (go to http://crates.io/search?q={} to see more)",
total_crates - limit as u32,
- percent_encode(query.as_bytes(), QUERY_ENCODE_SET))?;
+ percent_encode(query.as_bytes(), QUERY_ENCODE_SET));
}
Ok(())
assert_that(cargo_process("search").arg("postgres")
.arg("--host").arg(registry().to_string()),
execs().with_status(0)
- .with_stderr_contains("\
+ .with_stdout_contains("\
hoare = \"0.1.1\" # Design by contract style assertions for Rust"));
}
assert_that(cargo_process("search").arg("postgres").arg("sql")
.arg("--host").arg(registry().to_string()),
execs().with_status(0)
- .with_stderr_contains("\
+ .with_stdout_contains("\
hoare = \"0.1.1\" # Design by contract style assertions for Rust"));
}